package persondog;

public class BoyTest {
	public static void main(String[] args) {
		Dog d = new Dog("旺财","黄色");
		
		Boy b = new Boy("张乃升");
		
		// Boy依赖Dog
		b.walkDog(d);
		b.feedDog(d);
		
		Girl girl = new Girl(); // 名字没赋值，dog也没赋值
		Girl girl2 = new Girl("小芳",d);
		
		// Girl包含Dog的引用
		girl2.washDog();
		girl2.psDog();
	}
}
